﻿<Window x:Class="Aeon.Emulator.Launcher.DebuggerWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:debug="clr-namespace:Aeon.Presentation.Debugger;assembly=Aeon.Presentation"
        Name="root" Title="Aeon Debugger" Height="480" Width="640" Icon="Aeon.ico" ShowInTaskbar="False">
    <Window.Resources>
        <debug:AddressValueConverter x:Key="addressConverter" />
    </Window.Resources>
    <DockPanel>
        <ToolBar DockPanel.Dock="Top">
            <CheckBox Name="hexCheckBox" Content="Hex" IsChecked="{Binding IsHexFormat, ElementName=root, Mode=TwoWay}" />
        </ToolBar>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <DockPanel>
                <StackPanel Orientation="Horizontal" DockPanel.Dock="Top">
                    <TextBlock Text="Address:" Margin="5" />
                    <TextBox Width="140" FontFamily="Courier New" Margin="2" Text="{Binding StartAddress, ElementName=memoryView, Converter={StaticResource addressConverter}}" />
                </StackPanel>
                <Border>
                    <debug:MemoryView Name="memoryView" />
                </Border>
            </DockPanel>
            <debug:DisassemblyView Name="disassemblyView" Grid.Row="1" />
            <debug:RegisterViewer Name="registerView" Grid.Row="2" />
        </Grid>
    </DockPanel>
</Window>
